1. Field of the Invention
The present invention relates to an information processing apparatus and a virtual storage management method that virtually store processes using a primary storage device and a secondary storage device in the information processing apparatus, as well as a computer-readable storage medium storing a program for implementing the method.
2. Description of the Related Art
Conventionally, there has been known a virtual storage management method that uses a virtual storage system and controls swap of memory areas in multifunction peripherals such as an image processing apparatus having a variety of functions such as copying, printing, and faxing, and information processing apparatuses such as a computer system.
In the method using the virtual storage system, a memory area not less than the memory capacity of real memory in a primary storage device can be managed using a secondary storage device. In the case where a memory area not less than the memory capacity of real memory is used, swap processing is carried out in which contents of the memory area are temporarily saved (swapped out) in a storage area of, for example, an HDD (hard disk drive) as the secondary storage device.
At a time of execution of a process, when the memory area from which the process has been swapped out is to be used again, the process is transferred again from a storage area of the secondary storage device to a memory area of the real memory. Thus, for a process using the memory area from which the process has been swapped out, the start of an operation delays due to transfer overhead.
There has been known a technique to preferentially subject a memory area for a process that has already been swapped out partially to swap-out so that throughput of an apparatus as a whole can be enhanced (Japanese Laid-Open Patent Publication (Kokai) No. 2004-227188).
Incidentally, the function of excluding a specific memory area from swap-out is adopted in general-purpose operating systems such as Linux (registered trademark). Even in a system having a small amount of memory, by inhibiting swap-out of a memory area used by a process required to be preferentially executed, guaranteed operation of an emergent process and preferred execution of an important function can be realized.
In information processing apparatuses such as a digital multifunction peripheral, the number of programs (processes) installed has been increasing because the variety of functions has been increasing year after year. Such a device configuration as to reserve a large amount of memory area that does not require swap even when all the processes are concurrently executed is not realistic from the viewpoint of costs. Thus, it is necessary to swap out the contents in memory areas used by any process.
By inhibiting swap-out of processes executed frequently so that they can be preferentially executed, the throughput of the system as a whole can be enhanced.
Here, “memory priorities” that are degrees to which processes are not subjected to swap-out (degrees to which processes are preferentially remained in real memory) are given depending on types of processes. Specifically, attributes are sorted into normal processes and preferred processes that are more preferentially executed as compared with normal processes and not subjected to swap-out. A process that may be executed in cooperation with another process is referred to as a utility process. Among utility processes, the memory priorities of those which are executable in cooperation with either normal processes or preferred processes cannot be determined across the board.
Specifically, if memory priorities of utility processes are excessively lowered across the board, portions of their related preferred processes which cooperate with the utility processes are swapped out in many cases. For this reason, swap processing occurs frequently, which slows execution of the preferred processes.
On the other hand, if priorities of utility processes are excessively raised across the board, portions of their related normal processes which cooperate with the utility processes are remained in real memory in many cases. For this reason, the priorities of normal processes needlessly rise.
There is a limit on the number of processes that can be executable by a CPU (processor) per unit time, and hence when an attempt is made to preferentially execute a multitude of processes, the number of processes desired to be preferentially executed exceeds the limited number of executable processes. Namely, the CPU is overloaded, and so-called exhaustion of CPU resources occurs. When exhaustion of CPU resources occurs, waiting times for processing and so on are prolonged, which slows processing in the system as a whole, and will eventually slow execution of processes that should be truly preferred.
As described above, merely by determining priorities of utility processes across the board, the overall processing speed of the system may decrease depending on the situation.